<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:acegi="http://sourceforge.net/projects/jsf-comp/acegijsf">

<f:view>
	<f:loadBundle var="text" basename="#{basePage.bundleName}" />
	<head>
	<title>#{text['mainMenu.title']}</title>
	<meta name="menu" content="MainMenu" />
	<meta name="heading" content="#{text['mainMenu.heading']}" />
	</head>

	<p>#{text['mainMenu.message']}</p>

	<div class="separator"></div>

	<h:form id="showMyTransactionList">

		<t:dataTable value="#{clearingTransactionList.clearingTransactions}" var="transaction"
			style="margin-top: 10px" styleClass="scrollerTable table"
			headerClass="standardTable_Header"
			rowClasses="standardTable_Row1,standardTable_Row2"
			columnClasses="standardTable_Column,standardTable_Column,standardTable_Column,standardTable_Column,standardTable_ColumnCentered">
			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Product@" arrow="true">
						<h:outputText value="Product" />
						<!-- #{text['user.username']} -->
					</t:commandSortHeader>
				</f:facet>
				<h:outputText value="#{transaction.product}" />
			</t:column>
			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Market@" arrow="true">
						<h:outputText value="Market" />
					</t:commandSortHeader>
				</f:facet>
				<h:outputText value="#{transaction.market}" />
			</t:column>

			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Buyer@" arrow="true">
						<h:outputText value="Buyer" />
					</t:commandSortHeader>
				</f:facet>
				<h:outputText
					value="#{transaction.buyerUser.firstName} #{transaction.sellerUser.lastName}" />
			</t:column>
			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Seller@" arrow="true">
						<h:outputText value="Seller" />
					</t:commandSortHeader>
				</f:facet>
				<h:outputText
					value="#{transaction.sellerUser.firstName} #{transaction.sellerUser.lastName}" />
			</t:column>

			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Quantity@" arrow="true">
						<h:outputText value="Quantity" />
					</t:commandSortHeader>
				</f:facet>
				<h:outputText value="#{transaction.quantity}" />
			</t:column>
			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Price@" arrow="true">
						<h:outputText value="Price" />
					</t:commandSortHeader>
				</f:facet>
				<h:outputText value="#{transaction.price}" />
			</t:column>
			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Price Type@" arrow="true">
						<h:outputText value="Price Type" />
					</t:commandSortHeader>
				</f:facet>
				<h:outputText value="#{transaction.priceType}" />
			</t:column>
			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Currency@" arrow="true">
						<h:outputText value="Currency" />
					</t:commandSortHeader>
				</f:facet>
				<h:outputText value="#{transaction.currency}" />
			</t:column>
			<t:column width="10%">
				<f:facet name="header">
					<t:commandSortHeader columnName="Status@" arrow="true">
						<h:outputText value="Status" />
					</t:commandSortHeader>
				</f:facet>
				<h:outputText value="#{transaction.status}" />
			</t:column>

		</t:dataTable>


		<script type="text/javascript">highlightTableRows("showMyTransactionList:clearingTransactions");
		 // doesn't currently work to allow clicking row
		</script>

	</h:form>


	<div class="separator"></div>

	<h:form id="editUser">
		<ul class="glassList">
			<li><h:commandLink value="ClearingRules" action="xxxxx2" /></li>
		</ul>
	</h:form>

</f:view>
</html>
